import os

root_dir = r'E:\Code\File\AI-audit-sys\src\assets'
arrSvg = []
def checkFile():
    file_result = []
    for dir in os.listdir(root_dir):
        child = os.path.join(root_dir, dir)
        fileInDir(child)

def fileInDir(path):
    if os.path.isdir(path):
            for f1 in os.listdir(path):
                rootPath = os.path.join(path, f1)
                # print("f1--->" + f1)
                # print("path + f1--->" + rootPath)
                fileInDir(rootPath)
    else:
        isSVG(path)

def isSVG(item):
    if '.svg' in item:
        # print(item)
        arrSvg.append(item)
    elif '.png' in item:
        # print(item)
        arrSvg.append(item)
checkFile()
print(arrSvg)
        
        
        
